﻿<%@ Page Title="" Language="C#" MasterPageFile="~/Views/Shared/Site.Master" Inherits="System.Web.Mvc.ViewPage<TemplateWeb.Models.ViewModels.GroupViewModel>" %>

<asp:Content ID="Content1" ContentPlaceHolderID="MainContent" runat="server">
    <% 
        var oUser = Model.UsersModel.GetModel.LstObjModel[0];
    %>
    <script type="text/javascript">
        function ValidateCheckout() {
            var total = <%= Model.ShoppingCartModel.CartTotal %>;
            if (total == 0) {
                alert("Giỏ hàng hiện thời chưa có sản phẩm nào nên không thể thực hiện chức năng thanh toán");
                return false;
            }
            return true;
        }
    </script>
    <div id="DivTinTucVTA" style="display: block;">
        <table id="VTA_LoadContent_ctl00_VTA_LoadBody1_TblLoadQuanCao" style="width: 100%;
            border-collapse: collapse;" border="0" cellpadding="0" cellspacing="0">
            <tbody>
                <tr>
                    <td style="width: 100%;" valign="top">
                        <table width="100%" border="0" cellpadding="0" cellspacing="0">
                            <tbody>
                                <tr>
                                    <td class="maintabletitlebg" align="center" height="42">
                                        <h1>
                                            Thanh toán</h1>
                                    </td>
                                </tr>
                                <tr>
                                    <td class="graytdborder" style="border-right-width: 0px ! important;" align="center">
                                        <table width="100%" border="0" cellpadding="0" cellspacing="0">
                                            <tbody>
                                                <tr>
                                                    <td class="tdcell" align="left" width="100%">
                                                        <div style="padding: 10px; font-size: 12px;">
                                                            <div class="title">
                                                                <span>Thông tin người nhận</span><div class="bg">
                                                                    <img src="../../Content/Images/Home/bg_title_right.png"></div>
                                                            </div>
                                                            <div class="content">
                                                                <table width="100%" border="0" cellspacing="0" cellpadding="0">
                                                                    <tbody>
                                                                        <tr>
                                                                            <td valign="top">
                                                                                <!-- MAIN -->
                                                                                <br />
                                                                                <% using (Html.BeginForm("AddOrder", "Home", FormMethod.Post, new { onsubmit = "return ValidateCheckout();" }))
                                                                                   { %>
                                                                                <table width="100%" border="0" cellpadding="0" cellspacing="0" style="text-align: left">
                                                                                    <tbody>
                                                                                        <tr>
                                                                                            <td valign="top">
                                                                                                <div style="margin: 5px 10px;">
                                                                                                    <b>Họ tên người nhận</b></div>
                                                                                            </td>
                                                                                            <td valign="top">
                                                                                                <div style="margin: 5px 10px 5px 5px;">
                                                                                                    <%= Html.TextBox("Order_TenNguoiNhan", string.Empty, new { style = "width: 340px;" })%>
                                                                                                </div>
                                                                                            </td>
                                                                                        </tr>
                                                                                        <tr>
                                                                                            <td valign="top">
                                                                                                <div style="margin: 5px 10px;">
                                                                                                    <b>SĐT người nhận</b></div>
                                                                                            </td>
                                                                                            <td valign="top">
                                                                                                <div style="margin: 5px 10px 5px 5px;">
                                                                                                    <%= Html.TextBox("Order_SoDienThoaiNguoiNhan", string.Empty, new { style = "width: 340px;" })%>
                                                                                                </div>
                                                                                            </td>
                                                                                        </tr>
                                                                                        <tr>
                                                                                            <td valign="top">
                                                                                                <div style="margin: 5px 5px 5px 10px;">
                                                                                                    <b>Địa chỉ người nhận</b></div>
                                                                                            </td>
                                                                                            <td valign="top">
                                                                                                <div style="margin: 5px 10px 5px 5px;">
                                                                                                    <%= Html.TextBox("Order_DiaChiNguoiNhan", string.Empty, new { style = "width: 340px;" })%>
                                                                                                </div>
                                                                                            </td>
                                                                                        </tr>
                                                                                        <tr>
                                                                                            <td valign="top">
                                                                                                <div style="margin: 5px 5px 5px 10px;">
                                                                                                    <b>Ghi chú thêm</b></div>
                                                                                            </td>
                                                                                            <td valign="top">
                                                                                                <div style="margin: 5px 10px 5px 5px;">
                                                                                                    <%= Html.TextArea("Order_ChuThich", string.Empty, new { style = "width: 340px; height: 100px;" })%>
                                                                                                </div>
                                                                                            </td>
                                                                                        </tr>
                                                                                        <tr>
                                                                                            <td valign="top">
                                                                                                <div style="margin: 5px 5px 5px 10px;">
                                                                                                    <b>Số tiền thanh toán</b></div>
                                                                                            </td>
                                                                                            <td valign="top">
                                                                                                <div style="margin: 5px 10px 5px 5px;">
                                                                                                    <span class="font_price"><b>
                                                                                                        <%= string.Format("{0:0,0}", Model.ShoppingCartModel.CartTotal)%>
                                                                                                        VNĐ</b></span>
                                                                                                </div>
                                                                                            </td>
                                                                                        </tr>
                                                                                        <tr>
                                                                                            <td height="20" style="width: 130px">
                                                                                            </td>
                                                                                            <td height="20">
                                                                                                <div style="margin: 5px 10px 5px 5px;">
                                                                                                    <br />
                                                                                                    <input type="submit" name="sbt" id="sbt" value="Xác nhận" style="background-image: url(../../../Content/Images/Home/bgbutton.jpg);
                                                                                                        color: #FFFFFF; font-size: 16px; font-weight: bold; border: 1px #DBDBDB solid;
                                                                                                        height: 30px; cursor: pointer;" />
                                                                                                    <p>
                                                                                                    </p>
                                                                                                </div>
                                                                                            </td>
                                                                                        </tr>
                                                                                    </tbody>
                                                                                    <!-- MAIN END -->
                                                                                </table>
                                                                                <% } %>
                                                                            </td>
                                                                        </tr>
                                                                    </tbody>
                                                                </table>
                                                            </div>
                                                        </div>
                                                    </td>
                                                </tr>
                                            </tbody>
                                        </table>
                                    </td>
                                </tr>
                            </tbody>
                        </table>
                    </td>
                </tr>
            </tbody>
        </table>
    </div>
</asp:Content>
